graph TB
    %% 定义物理设备
    Device[设备硬件\nDevice Hardware]
    
    %% 定义操作系统层
    OS[操作系统\nOperating System]
    
    %% 定义服务管理层
    ServiceMgr[服务管理\nService Management]
    
    %% 定义微服务层
    subgraph 微服务层[FDS Master Go 微服务]
        ConfigServer[配置服务\nconfig_server]
        BluetoothServer[蓝牙服务\nbluetooth_server]
        CloudServer[云服务\ncloud_server]
        MonitorServer[监控服务\nmonitor_server]
        WebServer[Web服务\nweb_server]
    end
    
    %% 定义数据层
    subgraph 数据层[Data Layer]
        LocalDB[(本地数据库)]
        LogFiles[(日志文件)]
        ConfigFiles[(配置文件)]
    end
    
    %% 定义外部系统
    ExternalSystems[外部系统\nExternal Systems]
    
    %% 定义部署关系
    Device --> OS
    OS --> ServiceMgr
    ServiceMgr --> 微服务层
    
    ConfigServer --> ConfigFiles
    BluetoothServer --> LogFiles
    CloudServer --> LocalDB
    CloudServer --> LogFiles
    MonitorServer --> LogFiles
    WebServer --> LogFiles
    
    BluetoothServer <--> ExternalSystems
    CloudServer <--> ExternalSystems
    WebServer <--> ExternalSystems
    
    %% 定义启动顺序
    ServiceMgr -.->|1. 启动| ConfigServer
    ServiceMgr -.->|2. 启动| BluetoothServer
    ServiceMgr -.->|3. 启动| CloudServer
    ServiceMgr -.->|4. 启动| MonitorServer
    ServiceMgr -.->|5. 启动| WebServer
    
    %% 样式设置
    classDef hardware fill:#e9e9e9,stroke:#333,stroke-width:2px
    classDef os fill:#d4d4d4,stroke:#333,stroke-width:2px
    classDef serviceMgr fill:#b6b6b6,stroke:#333,stroke-width:2px
    classDef microservice fill:#bbdefb,stroke:#333,stroke-width:1px
    classDef datastore fill:#c8e6c9,stroke:#333,stroke-width:1px
    classDef external fill:#ffecb3,stroke:#333,stroke-width:1px
    
    class Device hardware
    class OS os
    class ServiceMgr serviceMgr
    class ConfigServer,BluetoothServer,CloudServer,MonitorServer,WebServer microservice
    class LocalDB,LogFiles,ConfigFiles datastore
    class ExternalSystems external 